Optimal. Leaf size=118 \[ -\frac {(2 a-b) \tanh ^{-1}\left (\frac {\sqrt {a+b \sin ^2(e+f x)}}{\sqrt {a+b}}\right )}{2 (a+b)^{5/2} f}+\frac {2 a-b}{2 (a+b)^2 f \sqrt {a+b \sin ^2(e+f x)}}+\frac {\sec ^2(e+f x)}{2 (a+b) f \sqrt {a+b \sin ^2(e+f x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.08, antiderivative size = 118, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {3273, 79, 53,
65, 214} \begin {gather*} \frac {2 a-b}{2 f (a+b)^2 \sqrt {a+b \sin ^2(e+f x)}}-\frac {(2 a-b) \tanh ^{-1}\left (\frac {\sqrt {a+b \sin ^2(e+f x)}}{\sqrt {a+b}}\right )}{2 f (a+b)^{5/2}}+\frac {\sec ^2(e+f x)}{2 f (a+b) \sqrt {a+b \sin ^2(e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 53
Rule 65
Rule 79
Rule 214
Rule 3273
Rubi steps
\begin {align*} \int \frac {\tan ^3(e+f x)}{\left (a+b \sin ^2(e+f x)\right )^{3/2}} \, dx &=\frac {\text {Subst}\left (\int \frac {x}{(1-x)^2 (a+b x)^{3/2}} \, dx,x,\sin ^2(e+f x)\right )}{2 f}\\ &=\frac {\sec ^2(e+f x)}{2 (a+b) f \sqrt {a+b \sin ^2(e+f x)}}-\frac {(2 a-b) \text {Subst}\left (\int \frac {1}{(1-x) (a+b x)^{3/2}} \, dx,x,\sin ^2(e+f x)\right )}{4 (a+b) f}\\ &=\frac {2 a-b}{2 (a+b)^2 f \sqrt {a+b \sin ^2(e+f x)}}+\frac {\sec ^2(e+f x)}{2 (a+b) f \sqrt {a+b \sin ^2(e+f x)}}-\frac {(2 a-b) \text {Subst}\left (\int \frac {1}{(1-x) \sqrt {a+b x}} \, dx,x,\sin ^2(e+f x)\right )}{4 (a+b)^2 f}\\ &=\frac {2 a-b}{2 (a+b)^2 f \sqrt {a+b \sin ^2(e+f x)}}+\frac {\sec ^2(e+f x)}{2 (a+b) f \sqrt {a+b \sin ^2(e+f x)}}-\frac {(2 a-b) \text {Subst}\left (\int \frac {1}{1+\frac {a}{b}-\frac {x^2}{b}} \, dx,x,\sqrt {a+b \sin ^2(e+f x)}\right )}{2 b (a+b)^2 f}\\ &=-\frac {(2 a-b) \tanh ^{-1}\left (\frac {\sqrt {a+b \sin ^2(e+f x)}}{\sqrt {a+b}}\right )}{2 (a+b)^{5/2} f}+\frac {2 a-b}{2 (a+b)^2 f \sqrt {a+b \sin ^2(e+f x)}}+\frac {\sec ^2(e+f x)}{2 (a+b) f \sqrt {a+b \sin ^2(e+f x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 5 vs. order 3 in
optimal.
time = 0.08, size = 75, normalized size = 0.64 \begin {gather*} \frac {(2 a-b) \, _2F_1\left (-\frac {1}{2},1;\frac {1}{2};\frac {a+b \sin ^2(e+f x)}{a+b}\right )+(a+b) \sec ^2(e+f x)}{2 (a+b)^2 f \sqrt {a+b \sin ^2(e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(2198\) vs.
\(2(102)=204\).
time = 71.23, size = 2199, normalized size = 18.64
method | result | size |
default | \(\text {Expression too large to display}\) | \(2199\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.52, size = 198, normalized size = 1.68 \begin {gather*} \frac {\frac {{\left (2 \, a b^{2} - b^{3}\right )} \log \left (\frac {\sqrt {b \sin \left (f x + e\right )^{2} + a} - \sqrt {a + b}}{\sqrt {b \sin \left (f x + e\right )^{2} + a} + \sqrt {a + b}}\right )}{{\left (a^{2} + 2 \, a b + b^{2}\right )} \sqrt {a + b}} - \frac {2 \, {\left (2 \, a^{2} b^{2} + 2 \, a b^{3} - {\left (2 \, a b^{2} - b^{3}\right )} {\left (b \sin \left (f x + e\right )^{2} + a\right )}\right )}}{{\left (b \sin \left (f x + e\right )^{2} + a\right )}^{\frac {3}{2}} {\left (a^{2} + 2 \, a b + b^{2}\right )} - {\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} \sqrt {b \sin \left (f x + e\right )^{2} + a}}}{4 \, b^{2} f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 215 vs.
\(2 (102) = 204\).
time = 0.51, size = 445, normalized size = 3.77 \begin {gather*} \left [-\frac {{\left ({\left (2 \, a b - b^{2}\right )} \cos \left (f x + e\right )^{4} - {\left (2 \, a^{2} + a b - b^{2}\right )} \cos \left (f x + e\right )^{2}\right )} \sqrt {a + b} \log \left (\frac {b \cos \left (f x + e\right )^{2} - 2 \, \sqrt {-b \cos \left (f x + e\right )^{2} + a + b} \sqrt {a + b} - 2 \, a - 2 \, b}{\cos \left (f x + e\right )^{2}}\right ) + 2 \, {\left ({\left (2 \, a^{2} + a b - b^{2}\right )} \cos \left (f x + e\right )^{2} + a^{2} + 2 \, a b + b^{2}\right )} \sqrt {-b \cos \left (f x + e\right )^{2} + a + b}}{4 \, {\left ({\left (a^{3} b + 3 \, a^{2} b^{2} + 3 \, a b^{3} + b^{4}\right )} f \cos \left (f x + e\right )^{4} - {\left (a^{4} + 4 \, a^{3} b + 6 \, a^{2} b^{2} + 4 \, a b^{3} + b^{4}\right )} f \cos \left (f x + e\right )^{2}\right )}}, \frac {{\left ({\left (2 \, a b - b^{2}\right )} \cos \left (f x + e\right )^{4} - {\left (2 \, a^{2} + a b - b^{2}\right )} \cos \left (f x + e\right )^{2}\right )} \sqrt {-a - b} \arctan \left (\frac {\sqrt {-b \cos \left (f x + e\right )^{2} + a + b} \sqrt {-a - b}}{a + b}\right ) - {\left ({\left (2 \, a^{2} + a b - b^{2}\right )} \cos \left (f x + e\right )^{2} + a^{2} + 2 \, a b + b^{2}\right )} \sqrt {-b \cos \left (f x + e\right )^{2} + a + b}}{2 \, {\left ({\left (a^{3} b + 3 \, a^{2} b^{2} + 3 \, a b^{3} + b^{4}\right )} f \cos \left (f x + e\right )^{4} - {\left (a^{4} + 4 \, a^{3} b + 6 \, a^{2} b^{2} + 4 \, a b^{3} + b^{4}\right )} f \cos \left (f x + e\right )^{2}\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\tan ^{3}{\left (e + f x \right )}}{\left (a + b \sin ^{2}{\left (e + f x \right )}\right )^{\frac {3}{2}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 1011 vs.
\(2 (106) = 212\).
time = 1.09, size = 1011, normalized size = 8.57 \begin {gather*} \frac {\frac {\frac {{\left (a^{4} b + 3 \, a^{3} b^{2} + 3 \, a^{2} b^{3} + a b^{4}\right )} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2}}{a^{5} b + 5 \, a^{4} b^{2} + 10 \, a^{3} b^{3} + 10 \, a^{2} b^{4} + 5 \, a b^{5} + b^{6}} + \frac {a^{4} b + 3 \, a^{3} b^{2} + 3 \, a^{2} b^{3} + a b^{4}}{a^{5} b + 5 \, a^{4} b^{2} + 10 \, a^{3} b^{3} + 10 \, a^{2} b^{4} + 5 \, a b^{5} + b^{6}}}{\sqrt {a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} + 2 \, a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 4 \, b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + a}} + \frac {{\left (2 \, a - b\right )} \arctan \left (-\frac {\sqrt {a} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - \sqrt {a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} + 2 \, a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 4 \, b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + a} - \sqrt {a}}{2 \, \sqrt {-a - b}}\right )}{{\left (a^{2} + 2 \, a b + b^{2}\right )} \sqrt {-a - b}} - \frac {2 \, {\left (2 \, {\left (\sqrt {a} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - \sqrt {a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} + 2 \, a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 4 \, b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + a}\right )}^{3} a + {\left (\sqrt {a} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - \sqrt {a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} + 2 \, a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 4 \, b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + a}\right )}^{3} b + 2 \, {\left (\sqrt {a} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - \sqrt {a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} + 2 \, a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 4 \, b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + a}\right )}^{2} a^{\frac {3}{2}} + 5 \, {\left (\sqrt {a} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - \sqrt {a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} + 2 \, a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 4 \, b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + a}\right )}^{2} \sqrt {a} b - 2 \, {\left (\sqrt {a} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - \sqrt {a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} + 2 \, a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 4 \, b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + a}\right )} a^{2} - {\left (\sqrt {a} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - \sqrt {a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} + 2 \, a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 4 \, b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + a}\right )} a b + 4 \, {\left (\sqrt {a} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - \sqrt {a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} + 2 \, a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 4 \, b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + a}\right )} b^{2} - 2 \, a^{\frac {5}{2}} - 5 \, a^{\frac {3}{2}} b - 4 \, \sqrt {a} b^{2}\right )}}{{\left ({\left (\sqrt {a} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - \sqrt {a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} + 2 \, a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 4 \, b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + a}\right )}^{2} - 2 \, {\left (\sqrt {a} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - \sqrt {a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} + 2 \, a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 4 \, b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + a}\right )} \sqrt {a} - 3 \, a - 4 \, b\right )}^{2} {\left (a^{2} + 2 \, a b + b^{2}\right )}}}{f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\mathrm {tan}\left (e+f\,x\right )}^3}{{\left (b\,{\sin \left (e+f\,x\right )}^2+a\right )}^{3/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________